package git.soulbgm.hdfs.properties;

import org.springframework.boot.context.properties.ConfigurationProperties;
import org.springframework.stereotype.Component;

import java.util.Map;

/**
 * 对象池配置
 *
 * @author SoulBGM
 * @date 2022/06/29 10:49
 */
@Component
@ConfigurationProperties(prefix = "hadoop.hdfs")
public class HdfsProperties {

    /**
     * 对象池最大空闲数
     */
    private int maxIdle = 5;
    /**
     * 对象池最大总数
     */
    private int maxTotal = 20;
    /**
     * 对象池最小空闲数
     */
    private int minIdle = 2;
    /**
     * 对象池初始化连接数
     */
    private int initialSize = 3;
    /**
     * hdfs defaultFs配置
     */
    private String defaultFs;
    /**
     * hdfs HA的nameservices设置，非HA可不写
     */
    private String nameservices;
    /**
     * hdfs HA设置，非HA可不写
     */
    private String ha;
    /**
     * hdfs HA的rpcAddress设置，非HA可不写
     */
    private String rpcAddress;
    /**
     * hdfs 的配置属性
     */
    private Map<String, String> properties;

    public int getMaxIdle() {
        return maxIdle;
    }

    public void setMaxIdle(int maxIdle) {
        this.maxIdle = maxIdle;
    }

    public int getMaxTotal() {
        return maxTotal;
    }

    public void setMaxTotal(int maxTotal) {
        this.maxTotal = maxTotal;
    }

    public int getMinIdle() {
        return minIdle;
    }

    public void setMinIdle(int minIdle) {
        this.minIdle = minIdle;
    }

    public int getInitialSize() {
        return initialSize;
    }

    public void setInitialSize(int initialSize) {
        this.initialSize = initialSize;
    }

    public String getDefaultFs() {
        return defaultFs;
    }

    public void setDefaultFs(String defaultFs) {
        this.defaultFs = defaultFs;
    }

    public String getNameservices() {
        return nameservices;
    }

    public void setNameservices(String nameservices) {
        this.nameservices = nameservices;
    }

    public String getHa() {
        return ha;
    }

    public void setHa(String ha) {
        this.ha = ha;
    }

    public String getRpcAddress() {
        return rpcAddress;
    }

    public void setRpcAddress(String rpcAddress) {
        this.rpcAddress = rpcAddress;
    }

    public Map<String, String> getProperties() {
        return properties;
    }

    public void setProperties(Map<String, String> properties) {
        this.properties = properties;
    }
}
